/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "interactiontype")
@NamedQueries({
    @NamedQuery(name = "Interactiontype.findAll", query = "SELECT i FROM Interactiontype i"),
    @NamedQuery(name = "Interactiontype.findByIdinteractiontype", query = "SELECT i FROM Interactiontype i WHERE i.idinteractiontype = :idinteractiontype"),
    @NamedQuery(name = "Interactiontype.findByInteractiontype", query = "SELECT i FROM Interactiontype i WHERE i.interactiontype = :interactiontype")})
public class Interactiontype implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idinteractiontype")
    private Integer idinteractiontype;
    @Basic(optional = false)
    @Column(name = "interactiontype")
    private String interactiontype;
    @OneToMany(mappedBy = "interactiontype", fetch = FetchType.LAZY)
    private List<Interaction> interactionList;

    public Interactiontype() {
    }

    public Interactiontype(Integer idinteractiontype) {
        this.idinteractiontype = idinteractiontype;
    }

    public Interactiontype(Integer idinteractiontype, String interactiontype) {
        this.idinteractiontype = idinteractiontype;
        this.interactiontype = interactiontype;
    }

    public Integer getIdinteractiontype() {
        return idinteractiontype;
    }

    public void setIdinteractiontype(Integer idinteractiontype) {
        this.idinteractiontype = idinteractiontype;
    }

    public String getInteractiontype() {
        return interactiontype;
    }

    public void setInteractiontype(String interactiontype) {
        this.interactiontype = interactiontype;
    }

    public List<Interaction> getInteractionList() {
        return interactionList;
    }

    public void setInteractionList(List<Interaction> interactionList) {
        this.interactionList = interactionList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idinteractiontype != null ? idinteractiontype.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Interactiontype)) {
            return false;
        }
        Interactiontype other = (Interactiontype) object;
        if ((this.idinteractiontype == null && other.idinteractiontype != null) || (this.idinteractiontype != null && !this.idinteractiontype.equals(other.idinteractiontype))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Interactiontype[idinteractiontype=" + idinteractiontype + "]";
    }

}
